<?	session_start(); 
	if(isset($_SESSION['id']) & isset($_SESSION['pass']))
	{

	require("koneksi.php");
	$kodemk=$_GET["kodemk"];
	$query=mysql_query("select * from mk111 where kodemk='$kodemk'");
	$row=mysql_fetch_row($query);
	
?>	

<form name="" method="POST" action="edit_mk.php">
	<table>
		<tr>
			<td colspan="3">Menu Edit Mata Kuliah</td>
		</tr>
		<tr>
			<td>Kode MK</td>
			<td>:</td>
			<td><input name="kodemk" type="text" value="<? echo "$row[0]"?>" ></td>
		</tr>
		<tr>
			<td>Nama MK</td>
			<td>:</td>
			<td><input name="nama" type="text" value="<? echo "$row[1]"?>" size="50"></td>
		</tr>
		<tr>
			<td>SKS</td>
			<td>:</td>
			<td><input name="sks" type="text" value="<? echo "$row[2]"?>" ></td>
		</tr>
		<tr>
			<td>Prasyarat SKS</td>
			<td>:</td>
			<td><input name="prasyaratsks" type="text" value="<? echo "$row[3]"?>" ></td>
		</tr>
		<tr>
			<td>Prasyarat 1</td>
			<td>:</td>
			<td><input name="prasyarat1" type="text" value="<? echo "$row[4]"?>"></td>
		</tr>
		<tr>
			<td>Prasyarat 2</td>
			<td>:</td>
			<td><input name="prasyarat2" type="text" value="<? echo "$row[5]"?>"></td>
		</tr>
		<tr>
			<td>Prasyarat 3</td>
			<td>:</td>
			<td><input name="prasyarat3" type="text" value="<? echo "$row[6]"?>"></td>
		</tr><tr>
			<td>Prasyarat 4</td>
			<td>:</td>
			<td><input name="prasyarat4" type="text" value="<? echo "$row[7]"?>"></td>
		</tr>
		<tr>
			<td>Prasyarat 5</td>
			<td>:</td>
			<td><input name="prasyarat5" type="text" value="<? echo "$row[8]"?>"></td>
		</tr>
		<tr>
			<td>Prasyarat 6</td>
			<td>:</td>
			<td><input name="prasyarat6" type="text" value="<? echo "$row[9]"?>"></td>
		</tr>
		<tr>
			<td>Prasyarat 7</td>
			<td>:</td>
			<td><input name="prasyarat7" type="text" value="<? echo "$row[10]"?>"></td>
		</tr>
		<tr>
			<td>Prasyarat 8</td>
			<td>:</td>
			<td><input name="prasyarat8" type="text" value="<? echo "$row[11]"?>"></td>
		</tr>
		<tr>
			<td>Prasyarat 9</td>
			<td>:</td>
			<td><input name="prasyarat9" type="text" value="<? echo "$row[12]"?>"></td>
		</tr>
		<tr>
			<td>Prasyarat 10</td>
			<td>:</td>
			<td><input name="prasyarat10" type="text" value="<? echo "$row[13]"?>"></td>
		</tr>
		<tr>
			<td>Prasyarat Grade</td>
			<td>:</td>
			<td><input name="prasyaratgrade" type="text" value="<? echo "$row[14]"?>"></td>
		</tr>
		<tr>
			<td colspan="2"><input name="simpan" type="submit" id="simpan" value="Save"></td>
			<td><input name="reset" type="reset" id="reset" value="Reset"></td>
		</tr>
	</table>
	<a href="menu_mata_kul.php">Back to Menu Mata Kuliah</a><br>
	<a href="menu_admin.php">Back to Menu Admin</a>
</form>
<? 
	}
	else
	echo "Silahkan <a href='index.php'>Login</a> dulu.";
?>
